import React, { CSSProperties } from 'react';
import { cssVar } from '@cscec/udp-ui';
import { containerStyle } from '../common';

/**
 * 宣传栏
 * @param param
 * @returns
 */
export default function Banner({
  style, title, desc, titleStyle, descStyle,
}: IProps) {
  return (
    <div style={{
      ...containerStyle,
      display: 'flex',
      color: '#fff',
      flexDirection: 'column',
      backgroundColor: cssVar.primaryColor,
      ...style,
    }}
    >
      <span className="nowrap" style={{ fontSize: 28, marginBottom: 12, ...titleStyle }}>{title}</span>
      <span style={{ ...descStyle }}>{desc}</span>
    </div>
  );
}

export interface IProps {
  style?: CSSProperties;
  title: string;
  desc: string;
  titleStyle?: CSSProperties;
  descStyle?: CSSProperties;
}
